package edu.fim.core.service.impl;

import javax.sql.DataSource;

import edu.fim.core.service.FIMService;
import edu.fim.data.DataSourceFactory;
import edu.fim.data.DatabaseSettings;
import edu.fim.data.dao.factory.DAOFactory;
import edu.fim.presentation.view.Form;
import edu.fim.presentation.view.LoginForm;


public class FIMServiceImpl implements FIMService {
	
	public void initialize() {
		DatabaseSettings dbSettings = new DatabaseSettings("jdbc:mysql", "localhost", "3306", "tcc");
		DataSource dataSource = DataSourceFactory.createDataSource(dbSettings, "root", "tcc");
		DAOFactory.getInstance().setDataSource(dataSource);
		Form form = new LoginForm("Login");
		form.setVisible(true);
	}
}